/* === v-radio === */

.v-radio {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  color: @font-color;
  +.v-radio {
    margin-left: 5px;
  }
  &__input {
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    display: inline-block;
    line-height: 1;
    position: relative;
    vertical-align: middle;
  }
  &__inner {
    display: inline-block;
    position: relative;
    border: @radio-border;
    border-radius: @radio-border-radius;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    z-index: 1;
    background: #ffffff;
    transition: border-color .25s cubic-bezier(.71,-.46,.29,1.46),
                background-color .25s cubic-bezier(.71,-.46,.29,1.46);
    &:hover {
      border: @radio-border-hover;
    }
    &:after {
      content: "";
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background-color: #fff;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%,-50%) scale(0);
      transition: transform .15s cubic-bezier(.71,-.46,.88,.6);
    }
  }
  &__original {
    opacity: 0;
    outline: none;
    position: absolute;
    margin: 0;
    size: 0;
    left: -999px;
  }
  &__label {
    font-size: @font-size-base;
  }

  &.is-checked {
    .v-radio__inner {
      background: @default-color;
      border-color: @default-color;
      &:after {
        transform: translate(-50%,-50%) scale(1);
      }
    }
  }
  &.is-focus {
    .v-radio__inner {
      border-color: @default-color;
    }
  }
  &.is-disabled {
    cursor: not-allowed;
    .v-radio__input {
      cursor: not-allowed;
    }
    .v-radio__inner {
      background: @disabled-bg;
      border-color: @disabled-border;
    }
    &.is-checked {
      .v-radio__inner {
        background: @disabled-border;
        border-color: @disabled-border;
      }
    }
  }
}

// radio group
.v-radio-group {
  display: inline-block;
  font-size: 0;
  line-height: 1;
  vertical-align: middle;
  & .v-radio {
    font-size: @radio-font-size;
  }
}

// radio button
.v-radio-button {
  position: relative;
  display: inline-block;
  &__inner {
    display: inline-block;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    background: @button-default-fill;
    border: @border-base;
    border-left: 0;
    color: @button-default-color;
    -webkit-appearance: none;
    text-align: center;
    box-sizing: border-box;
    outline: none;
    margin: 0;
    position: relative;
    cursor: pointer;
    transition: @all-transition;

    .button-size(@button-padding-vertical, @button-padding-horizontal, @button-font-size, 0);

    &:hover {
      color: @color-primary;
    }

    [class*="v-icon-"] {
      line-height: 0.9;

      & + span {
        margin-left: 5px;
      }
    }
  }
  &:first-child {
    .v-radio-button__inner {
      border-left: @border-base;
      border-radius: @border-radius-base 0 0 @border-radius-base;
      box-shadow: none !important;
    }
  }
  &:last-child {
    .v-radio-button__inner {
      border-radius: 0 @border-radius-base @border-radius-base 0;
    }
  }

  &:first-child:last-child {
    .v-radio-button__inner {
      border-radius: @border-radius-base;
    }
  }

  &__orig-radio {
    opacity: 0;
    outline: none;
    position: absolute;
    z-index: -1;
    left: -999px;

    &:checked {
      &+.v-radio-button__inner {
        color: @radio-button-checked-fill;
        background-color: @radio-button-checked-color;
        border-color: @radio-button-checked-border-color;
        box-shadow: -1px 0 0 0 @radio-button-checked-border-color;
      }
    }
    &:checked

    &:disabled {
      &+.v-radio-button__inner {
        color: @button-disabled-color;
        cursor: not-allowed;
        background-image: none;
        background-color: @button-disabled-fill;
        border-color: @button-disabled-border;
        box-shadow: none;
      }
    }
  }

  &--large {
    .v-radio-button__inner {
      .button-size(@button-large-padding-vertical, @button-large-padding-horizontal, @button-large-font-size, 0);
    }
  }
  &--small {
    .v-radio-button__inner {
      .button-size(@button-small-padding-vertical, @button-small-padding-horizontal, @button-small-font-size, 0);
    }
  }
  &--mini {
    .v-radio-button__inner {
      .button-size(@button-mini-padding-vertical, @button-mini-padding-horizontal, @button-mini-font-size, 0);
    }
  }
}
